Mac resources are software components used by other software to provide specific
features. They come in various forms, often within system files or applications.
The Toolbox
qqqqqqqqq
The Mac’s system includes two sets of Managers:-
1. A Toolbox, made up of programming tools
2. The Operating System, consisting of hardware managers.
The Toolbox can be used by all applications, including the Finder. Programmers often use it for standard operations — for example, to create a window using just one call to the Toolbox. You could write your own code there’s little point in wasting time, effort, disk space and memory. And being non-standard it could upset other software!
All of the Managers reside in ROM, in the System file or as a file in the System Folder.
The most important Managers are:-
Manager Area of operation
Control Manager Dialog boxes and buttons in boxes
Dialog Manager Messages on screen
Editions Manager Publish and Subscribe
Event Manager Mouse and keyboard actions
File System Manager Files in memory and on disk
Font Manager QuickDraw representation of characters
Menu Manager Pull-down menus
Notification Manager Messages about background operations
Printing Manager Printing
Process Manager Switching between applications
QuickDraw Rapid on-screen drawing
Resource Manager Resources in RAM used by applications
Scrap Manager Scrap in RAM for applications
Script Manager Global localisation
Sound Manager Sound
Text Edit Text editing routines
Toolbox Utilities See above
Window Manager Screen windows
Resources
qqqqqqqq
Resources contain calls to the system Toolbox that can be modified, added or deleted by means of a resource editor such as ResEdit or Resourcerer — balloon help resources can be added using BalloonWriter (APDA). Such resources reside in a file’s resource fork, separate from the data fork that often contains material you’ve created. Most applications, control panels and extensions have resource forks — documents rarely include them.
When an application needs resources it searches for them in the following sequence:-
Location Example
1 The current application Fonts installed in the application
2 The System file Fonts in the System file
3 Open suitcase files Font suitcases in the Fonts folder
Resource IDs
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Each resource item has its own ID number that ties it into the programmer’s code. Some numbers are reserved — for example custom icons always have an ID of -16455. New resources must use numbers from 128 to 32767 — but you can break this rule for fonts!
The numbers are grouped as follows:-
-32768 to -16385 Reserved by Apple — using these will cause problems with future
systems!
-16384 to -1 For a resource owned by another resource such as CDEF, DRVR, MDEF,
PACK, PDEF or WDEF. You can check what owns a resource using Get
Resource Info in ResEdit.
-4048 to -4033 For a resource inside a control panel file.
-4032 to -1 For a system resource owned by another system resource. You can
check what owns such a resource using Get Resource Info in ResEdit.
0 to 63 For a system resource such as CDEF, DRVR, MDEF, PACK, PDEF or
WDEF that owns another system resource.
0 to 127 Reserved for system resources, including WDEFs and CDEFs.
128 to 32767 Available to programmers. Non-system WDEFs and CDEFs are in
the range of 128 to 4095.
Resource List
qqqqqqqqqqq
The following list includes common resource types, some of which may be uncommon in recent system versions. All resource names consisting entirely of lower case letters are reserved by Apple. Many resource types turn up in all kinds of file — others are more likely to be found in the file types shown in brackets.
actb Alert colour table
acur Animated cursor
ADBS Apple Desktop Bus service routine (System file)
ALRT Alert template — text and items are in matching DITL
APPL Application list (Desktop file)
BNDL Bundle linking FREF and ICN# to provide correct icon on Desktop
boot Copy of boot blocks (System file)
cctb Control colour table
CDEF Control definition — contains code that can’t be easily modified
cdev Control device code (control panel)
cicn Large screen icon, colour
clut Generic colour table (System file)
CNTL Control template
CODE Application code segment — the main component of an application
crsr Cursor, colour
CURS Cursor, black & white with mask
DATA General purpose, used as an extra ‘data fork’
dctb Dialog colour table
DITL Dialog item list
DLOG Dialog template
DRVR Driver for DA, printer, network or monitor (System and DA files)
DSAT Default startup alert table (System file)
FCMT Finder Comment for Get Info (Desktop file)
fctb Font colour table
finf Font information
FKEY Function Key code — for command-shift 0 to 9 key combinations
fmnu Finder menu (Finder file)
fld# Folder names list
FOND Font family descriptor - list of font resources and styles
FONT Font description, bitmap
fPRT Print Catalogue defaults for Finder (printer driver file)
FREF File reference for BNDL used to identify correct icon
FRSV ROM font resources reserved for system (System file)
FWID Font width table
hdlg Balloon Help for dialog box items
hfdr Balloon Help for application icon in Finder
hmnu Balloon Help for menus in application
hovr Balloon Help that overrides Finder help
hrct Balloon Help for rectangles in windows
hwin Bundles together the hrct and hdlg resources for a window
ICON Large application icon, black & white
ICN# Large Desktop icon, black & white with mask
ictb Dialog items colour table
insc Installer script
INIT Startup resource (extension, control panel or System file)
itl0 International date and time format (INTL ID=0) (System file)
itl1 International names of days and months (INTL ID=1) (System file)
itl2 International Utilities string comparison hooks (System file)
itl4 International Tokenise tables & Localisation code (System file)
itl5 International Character Set encoding (System file)
itlb International Utilities Package Script bundles (System file)
itlc International Script Manager configuration (System file)
itlm Sorting order for Script, language and region (System file)
itlk International exception dictionary for KCHR (System file)
ics4 Small Desktop icon, 4-bit colour
ics8 Small Desktop icon, 8-bit colour
ics# Small Desktop icon, black and white with mask
ic14 Large Desktop icon, 4-bit colour
ic18 Large Desktop icon, 8-bit colour
KCAP Physical keyboard layout used by Keycaps DA (System file)
KCHR Keyboard character software ASCII mapping (System file)
KMAP Hardware keyboard mapping (System file)
KSWP Keyboard script swapping table (System file)
LDEF List definition — contains code that can’t be easily modified
lmem Finder low memory globals (System file)
mach Matches machine to control panel (control panel)
MACS Version number (System and Finder files)
MBDF Default menu definition (System file)
MBAR Menu bar, contains set of MENU IDs
mcky Mouse tracking speed presets for Mouse control panel (System)
mctb Menu colour table
MDEF Menu definition — contains code that can’t be easily modified
MENU Menu contents & style
mitq Internal memory needs for colour Make Inverse Table (System file)
mstr Finder substitute file storing Open and Quit strings (System file)
NFNT New Font Numbering Table bitmap font, indexed via Font & Style menus
nrct Rectangle position list
PACK High-level software packages (System file)
PAPA Printer name, type and zone (printer driver file)
PAT Black & white pattern, 8 by 8 pixels
PAT# Black & white pattern list
PDEF Printer definition (printer driver file)
PICT Picture
pltt Colour palette (Finder & application files)
pnot Preview notification — for PICT or TEXT preview in Open dialog
POST PostScript data (outline font, PostScript and printer driver files)
ppat Colour pattern
ppt# Colour pattern list
PRC0 Default printer page setup defaults
PRC3 Print window defaults
PTCH ROM patch code (System file)
qrsc Query
ROv# List of ROM resource overrides (System file)
scrn Screen configuration for Monitors control panel (System file)
SERD RAMSerial Driver (System file)
sfnt Spline or scalable font (TrueType/GX or enabled Type 1 suitcase)
SICN Small application icon, black & white — used in text views
SIZE Finder size information
snd_ Sound
snth Sound synthesiser resource — contains code not easily modified
STR String in Pascal format
STR# String list
styl Style information for text
sysz System Heap request (control panel)
TEXT Text string
TMPL ResEdit template — determines labels and data types
vers Version resource for Get Info in Finder
wctb Window colour table
WDEF Window definition — contains code that can’t be easily modified